<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        console.log("A");

        let pm = new Promise((resolve, reject) => {
            setTimeout(() => {
                console.log("B")
                resolve()
            }, 5000);
        })

        pm.then(() => {
            console.log("C")
        })

        // 同步：A--相隔5秒---BC
        // 异步：AC--相隔5秒---B

    </script>
</body>

</html>